<?php
class UserModel extends Model
{
	var $_validate = array(
		array('user_login','require','登录用户名不能为空！',MUST_TO_VALIDATE),
		array('user_email','require','联系email不能为空!',MUST_TO_VALIDATE),
		array('user_pass','checkConfirm','新密码与确认密码不一致',EXISTS_TO_VAILIDATE,'callback')
	);
	
	function checkConfirm($user_pass)
	{
		if(!empty($_POST["origin"])) //原始密码不为空表示要修改密码
			return $user_pass == $_POST["user_pass_confirm"];
		else
			return true;
	}
}
?>